#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QDialog>
#include <QListWidgetItem>
#include <QListView>
#include <QStandardItemModel>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>

#ifndef WIN32
       #include <sys/socket.h>
       #include <netinet/in.h>
       #include <arpa/inet.h>
     //#include <netinet/if_ether.h>
#else
       #include <winsock.h>
#endif

#include "Include/pcap.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    pcap_if_t *devs;

private:
    Ui::MainWindow *ui;
    QPushButton* CaptureInterface;
    QStandardItemModel* model;
private slots:
    void on_treeView_doubleClicked(QModelIndex index);
    int getNICs();
    void capture(const char *name,int p);
};

#endif // MAINWINDOW_H
